package Hangman;
/**
 * Player class, holds the Player objects, each player has a name and pointer to
 * its next player
 * @author Robin E, Jakob L, Isac A, Cristian O, Eric P, Tobias W. 
 *
 */
public class Player {	
	private String name;
	private Player nextPlayer;
	
	/**
	 * Player() simple constructor.
	 */
	public Player() {
		
	}
	
	/**
	 * Player(String name) simple constructor with one argument to decide
	 * the players name.
	 * @param name which name the player should have
	 */
	public Player(String name) {
		this.name = name;
	}

	/**
	 * getName() is used to return the name of the player
	 * @return name the players name
	 */
	public String getName() {
		return name;
	}
	/**
	 * getNextPlayer() is used to retrieve the next player from the current player
	 * @return nextPlayer the Player which is next in line.
	 */
	public Player getNextPlayer() {
		return nextPlayer;
	}

	/**
	 * setName(String name) is used to set the name of the player
	 * @param name the name to change to
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * setNextPlayer(Player nextPlayer) is used to set the pointer for 
	 * next comming player from this player
	 * @param nextPlayer the player to change the nextPlayer pointer to
	 */
	public void setNextPlayer(Player nextPlayer) {
		this.nextPlayer = nextPlayer;
	}
		

}
